<template>
  <view class="timer">
    <text>{{ row.orderTime }}</text>
    <uni-tag size="small" :type="platformTypeMap[row.platform] || 'default'">
      {{ platformLabelMap[row.platform] }}
    </uni-tag>
  </view>
</template>

<script setup lang="ts">
defineProps<{ row: any }>()

const platformLabelMap: Record<string, string> = {
  taobao: '淘宝',
  tmall: '天猫',
  jd: '京东',
  pdd: '拼多多',
  douyin: '抖音'
}

const platformTypeMap: Record<string, string> = {
  taobao: 'error',
  tmall: 'warning',
  jd: 'primary',
  pdd: 'success',
  douyin: 'purple'
}
</script>

<style scoped>
.timer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16rpx 0;
  font-size: 24rpx;
  color: #999;
}
</style>